﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace iBet.Services
{
    // NOTE: If you change the class name "TicketCalclator" here, you must also update the reference to "TicketCalclator" in Web.config.
    public class TicketCalculator : ITicketCalculator
    {
        #region Calculation Methods
        /// <summary>
        /// This method invokes method for ticket calculation
        /// </summary>
        /// <param name="ticket"></param>
        /// <returns></returns>
        public double CalculateTicket(Ticket ticket)
        {
            Calculator calculator = new Calculator();
            return calculator.CalculateTicket(ticket);
        }
        #endregion

        #region Validation Methods
        /*
        /// <summary>
        /// This method invokes method for ticket validation
        /// NOTE: Maybe we don't need validate ticket to be exposed in the WCF service
        /// </summary>
        /// <param name="ticket"></param>
        /// <returns></returns>
        public string ValidateTicket(Ticket ticket)
        {
            Calculator calculator = new Calculator();
            return calculator.ValidateTicket(ticket);
        }
         */
        #endregion

        #region Test Methods
        public double TestCalculation(double input)
        {
            return input * input;
        }

        public double TestCalculation1(object test)
        {
            double input = (double)test;
            return input * input;
        }
        #endregion
    }
}
